const int sensorPin = A0; const int ledPin = 27; void setup() { // declare the ledPin as an OUTPUT: pinMode(sensorPin, INPUT); pinMode(ledPin, OUTPUT); } void loop() { // read the value from the sensor: int sensorValue = analogRead(sensorPin); // turn the ledPin on digitalWrite(ledPin, HIGH); // stop the program for milliseconds: delay(sensorValue); // turn the ledPin off: digitalWrite(ledPin, LOW); // stop the program for for milliseconds: delay(sensorValue); }